#ifndef Scenic_Renderer_Util_h
#define Scenic_Renderer_Util_h

namespace Scenic
{
namespace Renderer
{

class RGBAFloat
{
public:
	float red;
	float green;
	float blue;
	float alpha;

	int getRGBA32() const;
};

class Float2
{
public:
	float x;
	float y;
};

class Double2
{
public:
	double x;
	double y;
};

class Affine2
{
public:
	double m00;
	double m01;
	double m10;
	double m11;
	double dx;
	double dy;

	Affine2 inverse();
	Double2 transform(const Double2 &p)
	{
		Double2 r;
		
		r.x = p.x * m00 + p.y * m01 + dx;
		r.y = p.x * m01 + p.y * m11 + dy;
		
		return r;
	}
};

bool convert(char *src, int srcPitch, Format srcFormat, char *dest, int dstPitch, Format dstFormat,
	int width, int height);

}
}

#endif
